<!DOCTYPE html>
<html>
<head>
    <title>用户管理</title>
	<#include "/header.html">
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList && showPwd">
        <div class="grid-btn">
            <input type="text" class="form-control" v-model="q.keyWord" style="width: 150px;display:inline;"
                   placeholder="id,手机">
            <input type="text" class="form-control" v-model="q.path" style="width: 75px;display:inline;"
                   placeholder="一级">
            <input type="text" class="form-control" v-model="q.path2" style="width: 75px;display:inline;"
                   placeholder="二级">
            <input type="text" class="form-control" v-model="q.path3" style="width: 75px;display:inline;"
                   placeholder="三级">
            <select id="combo" class="form-control col-sm-2" style="width: 10%"  v-model="q.authStatus" placeholder="实名状态">
                <option value="" selected="selected">--全部--</option>
                <option value="0">未实名</option>
                <option value="1">已申请</option>
                <option value="2">未通过</option>
                <option value="3">已实名</option>
            </select>
            <div class="form-group col-sm-2">
                <input type="text" readonly="true" style="width:40%"  class="form-control col-sm-4" v-model="q.startTime" id="createTime" @keyup.enter="query" placeholder="开始日期">
                <input type="text" readonly="true"  style="width:40%"  class="form-control col-sm-3" v-model="q.endTime" id="endTime" @keyup.enter="query" placeholder="结束日期">
            </div>
            <a class="btn btn-primary" @click="clear_s">清除开始</a>
            <a class="btn btn-primary" @click="clear_e">清除结束</a>
            <a class="btn btn-default" @click="query">查询</a>
			<#if shiro.hasPermission("sys:user:info")>
            <a class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
            <a class="btn btn-primary" @click="updatePwd"><i class="fa fa-pencil-square-o"></i>&nbsp;修改密码</a>
            <a class="btn btn-primary" @click="pass"><i class="fa fa-pencil-square-o"></i>&nbsp;实名通过</a>
            <a class="btn btn-primary" @click="kill"><i class="fa fa-pencil-square-o"></i>&nbsp;禁用用户</a>
            <a class="btn btn-primary" @click="download"><i class="fa fa-pencil-square-o"></i>&nbsp;导出</a>
			</#if>
        </div>
<!--        <div class="grid-btn">-->
<!--            <div class="form-group col-sm-12">-->
<!--                <input type="text" readonly="readonly" id="createTime" placeholder="开始日期" class="form-control col-sm-2 hasDatepicker" style="width:120px;margin-right: 20px;">-->
<!--                <input type="text" readonly="readonly" id="endTime" placeholder="结束日期" class="form-control col-sm-2 hasDatepicker" style="width:120px;margin-right: 20px;">-->
<!--                <a class="btn btn-primary">清除开始</a >-->
<!--                <a class="btn btn-primary">清除结束</a >-->
<!--            </div>-->
<!--            <input type="text" placeholder="id,手机" class="form-control" style="width: 150px; display: inline;margin-right: 20px;">-->
<!--            <input type="text" placeholder="一级" class="form-control" style="width: 75px; display: inline;margin-right: 20px;">-->
<!--            <input type="text" placeholder="二级" class="form-control" style="width: 75px; display: inline;margin-right: 20px;">-->
<!--            <input type="text" placeholder="三级" class="form-control" style="width: 75px;display: inline;margin-right: 20px;">-->
<!--            <select id="combo" placeholder="实名状态" class="form-control col-sm-2" style="width: 10%;margin-right: 20px;">-->
<!--                <option value="" selected="selected">&#45;&#45;全部&#45;&#45;</option>-->
<!--                <option value="0">未实名</option>-->
<!--                <option value="1">已申请</option>-->
<!--                <option value="2">未通过</option>-->
<!--                <option value="3">已实名</option>-->
<!--            </select>-->
<!--            <a class="btn btn-default">查询</a >-->
<!--            <a class="btn btn-primary"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a >-->
<!--            <a class="btn btn-primary"><i class="fa fa-pencil-square-o"></i>&nbsp;修改密码</a >-->
<!--            <a class="btn btn-primary"><i class="fa fa-pencil-square-o"></i>&nbsp;实名通过</a >-->
<!--            <a class="btn btn-primary"><i class="fa fa-pencil-square-o"></i>&nbsp;禁用用户</a >-->
<!--            <a class="btn btn-primary"><i class="fa fa-pencil-square-o"></i>&nbsp;导出</a >-->
<!--        </div>-->
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>


    <div v-show="!showList" class="panel panel-default">
        <div class="panel-heading">{{title}}</div>
        <form class="form-horizontal">
            <div class="form-group">
                <div class="col-sm-2 control-label">id</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="dict.id" disabled placeholder="id"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">手机账号</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="dict.mobile" disabled placeholder="手机账号"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">昵称</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="dict.nick" disabled placeholder="昵称"/>
                </div>
            </div>
<!--            <div class="form-group">
                <div class="col-sm-2 control-label">性别</div>
                <label class="radio-inline">
                    <input type="radio" name="gender" value="1" v-model="dict.gender"/> 男
                </label>
                <label class="radio-inline">
                    <input type="radio" name="gender" value="2" v-model="dict.gender"/> 女
                </label>
                <label class="radio-inline">
                    <input type="radio" name="gender" value="3" v-model="dict.gender"/> 未知
                </label>
            </div>-->
            <div class="form-group">
                <div class="col-sm-2 control-label">头像</div>
                <div class="col-sm-10">
                    <div class="col-sm-10">
                        <img style="width:180px;height:140px;" @click="showImg(dict.headUrl,'头像')" :src="dict.headUrl" alt="头像"/>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">上级id</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="dict.path" disabled placeholder="上级id"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">上上级id</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="dict.path2" disabled placeholder="上上级id"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">上上上级id</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="dict.path2" disabled placeholder="上上上级id"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">推荐关系</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="dict.route" disabled placeholder="推荐关系"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">邀请码</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="dict.inviteCode" disabled placeholder="邀请码"/>
                </div>
            </div>
            <!--<div class="form-group">-->
                <!--<div class="col-sm-2 control-label">会员等级</div>-->
                <!--<div class="col-sm-10">-->
                    <!--<input type="text" class="form-control" v-model="dict.teamLevel"  placeholder="会员等级"/>-->
                <!--</div>-->
            <!--</div>-->
            <div class="form-group">
                <div class="col-sm-2 control-label">会员等级名称</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" disabled="disabled" v-model="dict.teamName"  placeholder="会员等级名称"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">会员等级持续月数</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control"  v-model="dict.teamSustain"  placeholder="会员等级持续月数"/>
                </div>
            </div>
            <!--<div class="form-group">-->
                <!--<div class="col-sm-2 control-label">个人业绩等级</div>-->
                <!--<div class="col-sm-10">-->
                    <!--<input type="text" class="form-control" v-model="dict.personalLevel"  placeholder="个人业绩等级"/>-->
                <!--</div>-->
            <!--</div>-->
            <div class="form-group">
                <div class="col-sm-2 control-label">个人业绩等级名称</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" disabled="disabled"  v-model="dict.personalName"  placeholder="个人业绩等级名称"/>
                </div>
            </div>
            <!--<div class="form-group">-->
                <!--<div class="col-sm-2 control-label">季度等级</div>-->
                <!--<div class="col-sm-10">-->
                    <!--<input type="text" class="form-control" v-model="dict.quarterLevel"  placeholder="季度等级"/>-->
                <!--</div>-->
            <!--</div>-->
            <div class="form-group">
                <div class="col-sm-2 control-label">季度等级名称</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" disabled="disabled" v-model="dict.quarterName"  placeholder="季度等级名称"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">市场名称</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="dict.marketLine"  placeholder="市场名称"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">是否激活</div>
                <label class="radio-inline">
                    <input type="radio" name="active" value="0" v-model="dict.active"/> 未激活
                </label>
                <label class="radio-inline">
                    <input type="radio" name="active" value="1" v-model="dict.active"/> 已激活
                </label>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">认证状态</div>
                <label class="radio-inline">
                    <input type="radio" name="authStatus" value="0" v-model="dict.authStatus"/> 未实名
                </label>
                <label class="radio-inline">
                    <input type="radio" name="authStatus" value="1" v-model="dict.authStatus"/> 已申请
                </label>
                <label class="radio-inline">
                    <input type="radio" name="authStatus" value="2" v-model="dict.authStatus"/> 未通过
                </label>
                <label class="radio-inline">
                    <input type="radio" name="authStatus" value="3" v-model="dict.authStatus"/> 已实名
                </label>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">姓名</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="dict.realName"  placeholder="姓名"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">身份证号</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="dict.idNo"  placeholder="身份证号"/>
                </div>
            </div>
            <!--<div class="form-group">
                <div class="col-sm-2 control-label">身份证正面</div>
                <div class="col-sm-10">
                    <img style="width:180px;height:140px;" @click="showImg(dict.idUrl,'身份证正面')" :src="dict.idUrl" alt="身份证正面"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">身份证反面</div>
                <div class="col-sm-10">
                    <div class="col-sm-10">
                        <img style="width:180px;height:140px;" @click="showImg(dict.idBackUrl,'身份证反面')" :src="dict.idBackUrl" alt="身份证反面"/>
                    </div>
                </div>
            </div>-->
            <div class="form-group">
                <div class="col-sm-2 control-label"></div>
                <input type="button" class="btn btn-primary" @click="saveOrUpdate" value="确定"/>
            &nbsp;&nbsp;  <input type="button" class="btn btn-warning" @click="reload" value="返回"/>
            </div>
        </form>
    </div>

    <div v-show="!showPwd" class="panel panel-default">
        <div class="panel-heading">{{title}}</div>
        <form class="form-horizontal">
            <div class="form-group">
                <div class="col-sm-2 control-label">id</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="dict.id" disabled placeholder="id"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">手机账号</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="dict.mobile" disabled placeholder="手机账号"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">登录密码</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="password" placeholder="登录密码"/>
                </div>
            </div>

            <div class="form-group">
                <div class="col-sm-2 control-label"></div>
                <input type="button" class="btn btn-primary" @click="savePwd" value="确定"/>
                &nbsp;&nbsp;  <input type="button" class="btn btn-warning" @click="reload" value="返回"/>
            </div>
        </form>
    </div>

    <div id="Img" style="display: none;padding-left: 10px;padding-top: 10px;">
        <div style="width:100%;height:100%;display: flex;justify-content: center;align-items:center;">
            <img id="showImg" alt="" src="" style="max-width:100%;height:auto;object-fit:cover; ">
        </div>
    </div>
<script src="${request.contextPath}/statics/js/modules/biz/user.js?_${.now?long}"></script>
</body>
</html>